/**
 * 
 */
package main.rsevents;
import main.*;
import main.bots.Methods;
import main.listeners.ServerMessageListener;
import main.listeners.ServerMessagesHandler;
/**
 * @author Austin
 *
 */
public class ServerMessage implements RSEvent {
	
	public static ServerMessageListener listeners = null;
	

	@Override
	public void onRecievedEvent(RSEventContainer rsevent) {
		if(listeners == null) {
			ServerMessageListener a = (ServerMessageListener) Methods.getClientToUse().scriptMan.botRunning;
			if(a != null) {
				listeners = a;
			}
			} else {
				listeners.serverMessageRecieved(rsevent.getMessage()); //Send the message
			}
		
	}

}
